package Testing;

public class Concatenate {
	public Object[][] concat(Object[][] a) {
		Object[][] b = new Object[a.length][1];
		for (int i = 0; i < a.length; i++) {
			b[i][0]="";
			for (int j = 0; j < a[i].length; j++) {
				b[i][0]= b[i][0]+";"+a[i][j];
			}
			b[i][0]=b[i][0].toString().substring(1,b[i][0].toString().length() );
			/*System.out.println("b["+i+"][0]"+b[i][0]);*/
		}
		return b;
	}

	public static void main(String[] args) {

		String[][] a = {
				{ "logitech1.zymenet@zymesolutions.com", "password1","password1"  },
				{ "logitech2.zymenet@zymesolutions.com", "password2","password1"  },
				{ "logitech3.zymenet@zymesolutions.com", "password3","password1"  },
				{ "logitech4.zymenet@zymesolutions.com", "password4","password1"  } };
		
		Concatenate cc = new Concatenate();
		Object[][] b = null;
		b = cc.concat(a);
	}

	public String[] split(String concat) {
		String a[] = new String[2];
		a = concat.split(";");
		/*System.out.println(a[1].toString());*/
		return a;
	}

}



/*public class Concatenate {
	public Object[][] concat(Object[][] a) {

		Object[][] b = new Object[a.length][1];

		int k = 0;

		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {

				b[i][0]= a[i][j] + ";" + a[i][++j];
			}
			
		}
		return b;

	}

	public static void main(String[] args) {

		String[][] a = {
				{ "logitech1.zymenet@zymesolutions.com", "password1" },
				{ "logitech2.zymenet@zymesolutions.com", "password2" },
				{ "logitech3.zymenet@zymesolutions.com", "password3" },
				{ "logitech4.zymenet@zymesolutions.com", "password4" } };
		Concatenate cc = new Concatenate();
		Object[][] b = null;
		b = cc.concat(a);
		for (int j = 0; j < 1; j++) {
			for (int i = 0; i < b.length; i++) {
				System.out.println("main " + b[i][j]);
			}
		}
	}

	public String[] split(String concat) {
		String a[] = new String[2];
		a = concat.split(";");
		System.out.println(a[1].toString());
		return a;
	}

}
*/


